package com.ukao.steward.adapter;

import android.content.Context;
import android.widget.Button;
import android.widget.TextView;

import com.ukao.steward.R;
import com.ukao.steward.base.ListBaseAdapter;
import com.ukao.steward.base.SuperViewHolder;
import com.ukao.steward.bean.BaseListBean;
import com.ukao.steward.bean.StoreBean;
import com.ukao.steward.bean.TodayEarningBean;
import com.ukao.steward.util.CheckUtils;

import java.util.List;

import static com.ukao.steward.R.color.normal_blue;
import static com.ukao.steward.R.id.count;

/**
 * Created by ukaodev on 2017/8/24.
 */

public class StoreAdapter extends ListBaseAdapter<StoreBean> {




    public StoreAdapter(Context context, List<StoreBean> mHomeBean) {
        super(context, mHomeBean);
    }

    @Override
    public int getLayoutId() {
        return R.layout.adapter_store_item;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder,final int position) {
        StoreBean item = mDataList.get(position);
        TextView serveName = holder.getView(R.id.store_name);
        serveName.setText(CheckUtils.isEmptyString(item.getName()));
        if (item.isCheck()){
            serveName.setTextColor(getColors(R.color.white));
            holder.itemView.setBackgroundColor(getColors(R.color.pop_check_bg));
        }else{
            serveName.setTextColor(getColors(R.color.normal_blue));
            holder.itemView.setBackgroundColor(getColors(R.color.colorPrimary));
        }



    }

}
